<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ page isELIgnored="false" %> 

<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="net.ssta.core.db.Record"%>
<%@ page import="net.ssta.core.web.RequestKit"%>
<%@ page import="net.ssta.core.db.PagingInfo"%>
<%
	String path = request.getContextPath();
	
	//分页参数
    PagingInfo pagingInfo =(PagingInfo) request.getAttribute("pagingInfo");
    int pageno = pagingInfo.getCurrentPageNo();
	//获取技术需求列表
	RecordSet techneedSet = (RecordSet)request.getAttribute("techneedSet");
	//所属行业分类
    RecordSet newEnerClass = (RecordSet) request.getAttribute("newEnerClass");
	//代码、值Map
    Map fildOptionMap =  (HashMap)request.getAttribute("fildOptionMap");	
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
    <TITLE>信息管理-安全生产科技成果推广网</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <META http-equiv=x-ua-compatible content=ie=7>
    <META content="MSHTML 6.00.6000.17107" name=GENERATOR>
    <link href="<%=path%>/common/css/layout.css" rel="stylesheet" type="text/css" />
	<link href="<%=path%>/common/css/user.css" rel="stylesheet" type="text/css" />
    <LINK href="<%=path%>/includes/Fvalidate/style.css" type=text/css rel=stylesheet>
    <script type="text/javascript" src="<%=path%>/includes/DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="<%=path%>/includes/styleBase/js/jquery.js"></script>
	<script type="text/javascript" src="<%=path%>/includes/KindEditor/kindeditor.js"></script>    
    <script type="text/javascript" src="<%=path%>/includes/Fvalidate/Fvalidate.js"></script>

    <SCRIPT>
	function _delete(){
	//var length =  $("input[type=checkbox]").length;
	
	var ids= $("input[type='checkbox']");
	var length = 0;
	for(var i=0; i<ids.length; i++)
	{
		if(ids[i].checked) 
		{
			length++;
		}
	}
	
	if(length==0)
	{
		alert("请至少一条记录进行操作");
		return;
	}
	
	
	var pids="";
	if(confirm("您确定要删除所选中的信息？信息一旦删除将不能恢复！")){
		for(var i=0; i<ids.length; i++)
		{
			if(ids[i].checked) 
			{
				pids=pids+ids[i].value+',';  //如果选中，将value添加到变量pids中
			}
		}
		
		 $.ajax({
				type: "POST", url: "<%=path%>/membercenter/market?method=techneedDelete&uuids="+pids,
				error:function(){alert("与服务器失去联系，请刷新本页面后再重试！");},
				success: function(msg){
					alert("删除操作成功!");
					_goPage(<%=pageno%>);
				}
			 });
		}
	}



    function _infoshow(uuid)
	{
	 	window.location.href = "<%=path%>/membercenter/market?method=techneedShow&uuid="+uuid;
	}  
    </SCRIPT>     
</HEAD>

<BODY>

<%@include file="../../common/toplogin.jsp"%>    
<%@include file="../../common/topbanner.jsp"%> 
<%@include file="../../common/topmenu.jsp"%> 
 
<div id="contentmain">

	<div id="content_left">

			<%@include file="../include/userbaseInfo.jsp"%>
		
		 <jsp:include   page="../include/marketleft.jsp"    flush="true">   
		      <jsp:param    name="selected"    value="2"    />   
		 </jsp:include>
		
	</div>
    
    <div id="content_right">
       <jsp:include   page="../include/baseTop.jsp"    flush="true">   
		      <jsp:param    name="open"    value="2"    />   
		</jsp:include>
      <Br />
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
      	<tr><td colspan="4"><div id="redtitle">您的技术需求列表</div></td></tr>
    	<tr>
        	<td width="4%" height="30">&nbsp;</td>
       	  <td width="60%">标题</td>
            <td width="23%">发布时间</td>
            <td width="13%">操作</td>
        </tr>
        <%
		if(techneedSet!=null){
			for(int i=0;i<techneedSet.size();i++){
      			Record techneedRecord = techneedSet.get(i);
		%>
        <tr>
        	<td width="4%" height="30"><input type="checkbox" name="uuid" id="uuid" value="<%=techneedRecord.getString("ID","")%>"></td>
            <td width="60%" align="left"><%=techneedRecord.getString("TITLE","")%></td>
            <td width="23%"><%=techneedRecord.getString("SUBMITDATE","")%></td>
            <td width="13%"><a href="#2012" onClick="_infoshow('<%=techneedRecord.getString("ID","")%>')">编辑</a></td>
        </tr>
        <%
			}
		}
		%>
       
        <tr>
       	  <td colspan="4" height="50" align="center">
            <input type="button" onClick="javascript:_delete();" name="addtech" value="删除选中的技术需求" /> 
          </td>
        </tr>
        <tr><td height="35" colspan="3" align="right"><jsp:include flush="true" page="/common/paging.jsp"></jsp:include></td></tr>
	</table>
    </div>
</div>
    
<%@include file="../../common/bottom.jsp"%>    

</BODY>
</HTML>
